Skip to content

making stashcp a package not a module (SOFTWARE-3799)#106

Merged
djw8605 merged 5 commits intoopensciencegrid:masterfrom
ddavila0:master
Oct 2, 2019
Merged

making stashcp a package not a module (SOFTWARE-3799)#106
djw8605 merged 5 commits intoopensciencegrid:masterfrom
ddavila0:master

Conversation

@ddavila0
Copy link
Copy Markdown

When installed as a package, the option package_data can be used to put caches.json within the package directory.
We still use data_files to put caches.json outside the package directory, in <sys.prefix>/share/stashcache, the later location of caches.json has precedence over the one inside the package directory and /etc/stashcache takes precedence over both of them.

/etc/stashcache/caches.json is not created by the installation process if needed has to be created by the user.

@ddavila0 ddavila0 requested a review from djw8605 September 16, 2019 20:37
Copy link
Copy Markdown
Member

@djw8605 djw8605 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix the tests as well. They seem to want StashCache/stashcp.py.

Comment thread stashcp/__init__.py Outdated
@djw8605
Copy link
Copy Markdown
Member

djw8605 commented Oct 1, 2019

Looks like the tests are failing to find caches.json anywhere? Previously it worked because stashcp would try to look at the directory that it was running in. but that was removed. Should it be added back?

@ddavila0
Copy link
Copy Markdown
Author

ddavila0 commented Oct 1, 2019

What if we instead install the package (pip install StashCache/) and let it read the file from /share/stashcache ? I think that testing this way is more appropriate, what do you think?

@djw8605
Copy link
Copy Markdown
Member

djw8605 commented Oct 1, 2019

Agreed, install stashcache before testing it.

@djw8605
Copy link
Copy Markdown
Member

djw8605 commented Oct 1, 2019

Probably have to install pip first.

@ddavila0
Copy link
Copy Markdown
Author

ddavila0 commented Oct 2, 2019

Tests are fine now, do everything else look fine?

@djw8605 djw8605 merged commit ff35fe4 into opensciencegrid:master Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants